#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([libNodeStats], [0.2.0], [a.romanek@no.pl])
AM_CONFIG_HEADER([src/config.h])
AM_INIT_AUTOMAKE([gnu])
LT_INIT([dlopen])

# Checks for programs.
AC_PROG_CXX
AC_PROG_INSTALL

# Checks for libraries.
AC_ARG_WITH(arlib,
    [  --with-arlib=<dir>      prefix of arlib installation. e.g. /usr/local or /usr],
    [ARLIB_PREFIX=$with_arlib],
    AC_MSG_ERROR([You must call configure with the --with-arlib option.])
    )

AC_SUBST(ARLIB_PREFIX)

ARLIB_CFLAGS=-I${ARLIB_PREFIX}/include
ARLIB_LIBADD=-L${ARLIB_PREFIX}/lib

AC_SUBST(ARLIB_CFLAGS)
AC_SUBST(ARLIB_LIBADD)

# Checks for header files.
AC_HEADER_STDC

AC_CHECK_HEADERS(unistd.h sys/types.h,,AC_MSG_ERROR[
required header file missing])

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([Makefile \
                 src/Makefile \
                 src/ccms/Makefile \
                 src/ccms/nr/Makefile \
                 tests/Makefile])
AC_OUTPUT
